package cn.edu.sgu.www.pms.dto;

import cn.edu.sgu.www.pms.consts.CustomMessages;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class MenuDTO implements Serializable {
    private static final long serialVersionUID = 18L;

    @ApiModelProperty(value = "菜单ID")
    private String id;

    /**
     * 菜单名称
     */
    @NotBlank(message = "菜单名称" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "菜单名称", required = true)
    private String name;

    /**
     * 菜单类型
     * 0-父菜单；1-子菜单
     */
    @NotNull(message = "菜单类型" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "菜单类型", required = true)
    private Integer type;

    /**
     * 应用ID
     */
    @NotNull(message = "应用" + CustomMessages.ID_NOT_NULL)
    @ApiModelProperty(value = "应用ID", required = true)
    private Integer serviceId;

    /**
     * 页面地址
     */
    @ApiModelProperty(value = "页面地址")
    private String url;

    /**
     * 图标样式
     */
    @ApiModelProperty(value = "图标样式")
    private String iconClass;

    /**
     * 父菜单ID
     */
    @ApiModelProperty(value = "父菜单ID")
    private String parentId;
}